﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="MapShow.aspx.cs" Inherits="Map_MapShow" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">  
         html{height:100%}   body{height:100%;margin:0px;padding:0px}   #container{height:100%}   
    </style>
    <script type="text/javascript" src="http://api.map.baidu.com/api?v=1.4"></script>
    <script src="../Resources/Scripts/jQuery/jquery-1.7.1.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            var map = new BMap.Map("container"); // 创建地图实
            var point = new BMap.Point(113.628947, 34.755186);  // 创建点坐标
            map.centerAndZoom(point, 12);  // 初始化地图，设置中心点坐标和地图级别
            map.enableScrollWheelZoom();
            map.clearOverlays();
            map.disableDoubleClickZoom();
            map.addEventListener("dblclick", function (e) {
                $("#txtlng").val(e.point.lng + "," + e.point.lat);
                //alert(e.point.lng + "," + e.point.lat);
            });

        })

       
    </script>
</head>
<body  >
    <div >
      <input id="txtlng" type="text"  style="width:200px; float:right;  background-color:Gray; color:Red;" />
    </div>
    <div id="container"></div>
    <%--<input type="button" onclick="$('.BMap_cpyCtrl').remove();" value="移除百度地图LOGO和版权说明"/>--%>
    <script type="text/javascript">
       
       
      // var traffic = new BMap.TrafficLayer();   //添加交通层
      //map.addTileLayer(traffic);  

    </script>
    
</body>
</html>
